package com.example.user.service;

import com.example.event.GenericEvent;
import com.example.model.entity.user.User;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class OrgModuleListener {
    @EventListener
    public void handleUserCreated(GenericEvent<User> event) {
        User user = event.getPayload();
        System.out.println("组织模块：为用户创建默认部门");
        // 调用组织服务创建部门
    }
}